﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WCFServicesForCitrix.ConfigurationHandlers
{
    public class XenServersCollection : System.Configuration.ConfigurationElementCollection
    {
        public XenServersCollection()
        {
//            XenServerElement ServerElement = (XenServerElement)CreateNewElement();
  //          this.BaseAdd(ServerElement);
        }
        protected override object GetElementKey(System.Configuration.ConfigurationElement element)
        {
            //return ((UrlConfigElement)element).Name;
            return ((XenServerElement)element).NetBiosName;
        }
        protected override System.Configuration.ConfigurationElement CreateNewElement()
        {
            return new XenServerElement();
        }
        public override System.Configuration.ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return System.Configuration.ConfigurationElementCollectionType.BasicMap;
            }
        }
        protected override string ElementName
        {
            get
            {
                return "XenServer";
            }
        }
        new public XenServerElement this[string Key]
        {
            get
            {
                return (XenServerElement)BaseGet(Key);
            }
        }
        
    }
}
